﻿@model BrnMall.Web.MallAdmin.models.DistributionParamModel
@{
	var productPumpedTypeItems = new[]
	{
		new SelectListItem {Text = "固定", Value = DistributionProductPumpedType.Fixed.ToString()},
		new SelectListItem {Text = "百分比", Value = DistributionProductPumpedType.Percentage.ToString()}
	};
}
@section header{
	<link type="text/css" rel="stylesheet" href="/admin_mall/content/css/site.css" />
	<script src="/admin_mall/scripts/jquery.js"></script>
	<script src="/admin_mall/scripts/distributionParamSet.js?v=2"></script>
}
@section body{
	<h1 class="rightH1">分销管理 &gt;&gt; 参数设置
		<div class="clear">
		</div>
	</h1>
	@using (Html.BeginForm())
 {
		@Html.HiddenFor(_ => _.Id)
		<table>
			<tr>
				<td>分销级数</td>
				<td>
					@Html.TextBoxFor(_ => _.TotalLevel, new Dictionary<string, object> { { "oldval", Model.TotalLevel } })
				</td>
			</tr>
			<tr>
				<td>各级占比</td>
				<td>
					<table class="levelPercentItems">
						@for (var i = 0; i < Model.LevelPercent.Count; i++)
	  {
							<tr>
								<td>@(Model.LevelPercent[i].Level)级</td>
								<td>
									@Html.HiddenFor(_ => _.LevelPercent[i].Level)
									@Html.TextBoxFor(_ => _.LevelPercent[i].Percent, new Dictionary<string, object> { { "class", "lp-item" } })%
								</td>
							</tr>
	  }
					</table>
				</td>
			</tr>
			<tr>
				<td>提成类别</td>
				<td>
					@Html.DropDownListFor(_ => _.ProductPumpedType, productPumpedTypeItems)
				</td>
			</tr>
			<tr>
				<td>抽成值</td>
				<td>
					@Html.TextBoxFor(_ => _.ProductPumpedValue)
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<a href="javascript:" class="addBt" id="sumbitBut">
						<img src="/admin_mall/content/images/submit.jpg" />
					</a>
				</td>
			</tr>
		</table>
 }
}